#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <string.h>
int fun(int score[], int m, int below[])
{
    int sum = 0;
    int j = 0;
    for (int i = 0; i < m; i++) {
        sum += score[i];
    }
    int mean = sum / m;
    for (int i = 0; i < 9; i++) {
        if (score[i] < mean) {
            below[j] = score[i];
            j++;
        }
    }
    return j;
}
main()
{
    int i, n, below[9];
    int score[9];
    for (i = 0; i < 9; i++)
        scanf("%d", &score[i]);
    n = fun(score, 9, below);
    for (i = 0; i < n; i++)
        printf("%d ", below[i]);
}